import { useCallback, useEffect, useRef } from "react"
import { DeviceEventEmitter } from "react-native";

// 触发器
const useTrigger = () => {
    const trigger = useCallback((eventName, eventParams) => {
        DeviceEventEmitter.emit(eventName, eventParams)
    }, [])
    return trigger
}